AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')

function ENT:GiveDrugEffects(ply)
	local tickname = ply:SteamID() .. "regentick"
	
	timer.Create(tickname, 1, 0, 
	function(tname)
		if !IsValid(ply) then
			timer.Remove(tname)
			return
		end
		local plhealth = ply:Health()
		local maxhealth = ply:GetMaxHealth()
		local plarmor = ply:Armor()
		
		/*if plhealth <= 0 then
			timer.Remove(tname)
		end*/
		
		if plhealth < maxhealth then
			ply:SetHealth(plhealth + 4)
			if ply:Health() > maxhealth then ply:SetHealth(maxhealth) end
		elseif plarmor < 100 then
			ply:SetArmor(plarmor + 2)
			if ply:Armor() > 100 then ply:SetArmor(100) end
		end
	end
	, tickname)
	
	self.BaseClass.GiveDrugEffects(self, ply)
end

function ENT:TakeDrugEffects(ply)
	timer.Remove(ply:SteamID() .. "regentick")
	
	//self.BaseClass.TakeDrugEffects(self, ply)
end